package com.xqls.controller;

import org.apache.commons.lang.StringUtils;

/**
 * Created by Administrator on 2017/5/23.
 */
public class Test {

    public static void main(String[] args) {
        StringUtils stringUtils = new StringUtils();
        String str = "哈哈:haha,呵呵:heh";
        String str1[] = str.split(",");
        for (int i=0;i<str1.length;i++){
            String str3 = stringUtils.substringBeforeLast(str1[i], ":");
            System.out.print(str3+' ');
        }
    }
}
